package com.hyh;


import com.hyh.utils.JedisConnectionFactory;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;


public class testpool {

    private Jedis jedis;


    @BeforeEach
    public void setUp() {
        // 从
        jedis = JedisConnectionFactory.getJedis();





    }


    @Test
    public void test() {

        String result = jedis.set("name", "赵六liu");
        System.out.println("result  = " + result);
        //获取数据
        jedis.get("name");


    }

    @AfterEach
    void tearDown() {
        if (jedis != null) {
            jedis.close();
        }
    }







}
